﻿using System;
using System.Collections.Generic;
using System.Text;
using AddIn.Core;
using AddIn.UiInterface;

namespace WebMap
{
    public class WebMapService : ServiceBase
    {
        private Form1 _webMap = null;
        private IUiExService _uiService = null;

        public WebMapService()
        {
            AppFrame.AfterLoadMainForm += new LoadMainFormHandler(AppFrame_AfterLoadMainForm);
        }

        void AppFrame_AfterLoadMainForm(LoadMainFormEventArgs e)
        {
            _uiService = base.UiService as IUiExService;
        }


        public void Run()
        {
            if (_webMap == null)
                _webMap = new Form1();

            _uiService.ShowDocForm(_webMap);
        }
    }
}
